package com.gmail.dengtao.joe.group.transport.impl;

import com.gmail.dengtao.joe.group.channel.Channel;
import com.gmail.dengtao.joe.group.interceptor.InterceptorStack;
import com.gmail.dengtao.joe.group.transport.ChannelReceiver;
import com.gmail.dengtao.joe.transport.handler.HandlerAdapter;

public abstract class AbstractReceiverHandler extends HandlerAdapter {

	protected Channel channel;
	protected InterceptorStack interceptorStack = null;

	protected int idleTimeForRead = 0;		// idle time for read in seconds.
	
	/**
	 * Set idle time for read in seconds, you should call this method before {@link ChannelReceiver#start()}.
	 * @param idleTimeForRead
	 * @since 1.0
	 */
	public void setIdleTimeForRead(int idleTimeForRead) {
		this.idleTimeForRead = idleTimeForRead;
	}

	public void setInterceptorStack(InterceptorStack interceptorStack) {
		this.interceptorStack = interceptorStack;
	}
}